<%@ page language="java" pageEncoding="UTF-8"
	contentType="text/html;charset=utf-8"%>
<%@ include file="/includes/taglibs.jsp"%>
<script type="text/javascript">
	function pageSkip(pageNumber) {
		$("#pageNumber").val(pageNumber);
		$("#listForm").submit();
		return false;
	}
</script>
<div class="pagination" style="margin-top: 5px;">
	<c:if test="${page.totalPages >= 1}">
		<div class="pagination">
			<c:if test="${page.pageNumber==1}">
				<span class="firstPage">&nbsp;</span>
			</c:if>
			<c:if test="${page.pageNumber!=1}">
				<a class="firstPage"
					href="javascript: pageSkip(${firstPageNumber});">&nbsp;</a>
			</c:if>
			<c:if test="${page.pageNumber>1}">
				<a class="previousPage"
					href="javascript: pageSkip(${page.pageNumber-1});">&nbsp;</a>
			</c:if>
			<c:if test="${page.totalPages>page.pageNumber}">
				<a class="nextPage"
					href="javascript: pageSkip(${page.pageNumber+1});">&nbsp;</a>
			</c:if>
			<c:if test="${page.totalPages<=page.pageNumber}">
				<span class="nextPage">&nbsp;</span>
			</c:if>
			<c:if test="${page.pageNumber==page.totalPages}">
				<span class="lastPage">&nbsp;</span>
			</c:if>
			<c:if test="${page.pageNumber<page.totalPages}">
				<a class="lastPage" href="javascript: pageSkip(${page.totalPages});">&nbsp;</a>
			</c:if>
			<c:if test="${page.totalPages!=1}">
				<input id="pageNumber" name="pageNumber"
					value="<c:out value="${page.pageNumber}"/>" maxlength="9"
					onpaste="return false;" />
				<button type="submit">跳转</button>
			</c:if>
		</div>
	</c:if>
</div>